//https://br.spoj.pl/problems/CURSO/
#include <algorithm>
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <bitset>
#include <queue>
#include <stack>
#include <set>
#include <map>

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cmath>

using namespace std;
int dep[200][16];
char nome[200][8], temp[8];

map<string, int> sem;

int s, n, m, i, j, k, t, u;

bool read(){
	for(t=1,i=0;i<n;++i){
		scanf("%s%d", temp, &k);
		if(t=)

		u=t;
		for(j=0, ++t ; j<k ; ++j ){
			scanf("%s", nome[t]);
			dep[u]
		}

	}
}
void process(){

}

int main(){
	freopen("in.txt","r",stdin);freopen("out.txt","w",stdout);

	while(scanf("%d%d", &n, &m)){
		read();
		process();
	}
	return 0;
}
